-
Notifications
You must be signed in to change notification settings - Fork 4k
logical: add initial/catchup scan metrics to offline scan #155274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR? 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the LDR offline scan processor to emit checkpoint range statistics and update the logical_replication.scanning_ranges
and logical_replication.catchup_ranges
metrics during fast initial scans.
Key changes:
- Added range statistics collection to the offline initial scan processor
- Refactored error handling in the Next() method for better maintainability
- Enhanced checkpoint processing to include range statistics
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
pkg/crosscluster/logical/offline_initial_scan_processor.go | Added range statistics channel, refactored error handling, and enhanced checkpoint processing to emit range stats |
pkg/crosscluster/logical/logical_replication_job.go | Added tracking of write processor count for metrics |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This patch teaches the LDR offline scan processor to emit checkpoint range stats and update the `logical_replication.scanning_ranges` and `logical_replication.catchup_ranges` metrics. Informs: cockroachdb#152273 Release note: LDR now updates the `logical_replication.scanning_ranges` and `logical_replication.catchup_ranges` metrics during fast initial scan.
7c54aaa
to
02bdcbc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
sourceSpans []roachpb.Span | ||
partitionPgUrls []string | ||
destTableBySrcID map[descpb.ID]dstTableMetadata | ||
sourceSpans []roachpb.Span |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what autoformatter do you use? is it more than crlfmt
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should just be crlfmt
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh this particular formatting case I think happened because of the comment — I believe crlfmt
only indents types for fields that are adjacent, and a comment breaks that adjacency.
TFTR! bors r=msbutler |
Build succeeded: |
This patch teaches the LDR offline scan processor to emit checkpoint range stats and update the
logical_replication.scanning_ranges
andlogical_replication.catchup_ranges
metrics.Informs: #152273
Release note: LDR now updates the
logical_replication.scanning_ranges
andlogical_replication.catchup_ranges
metrics during fast initial scan.